<?php

	$no_transaksi = $laporan_data['no_transaksi'];
	$no_rekening = $laporan_data['no_rekening'];
	$jenis_simp = $laporan_data['jenis_simp'];
	$nama = $laporan_data['nama_anggota'];
	
	$tgl = substr($laporan_data['tgl_reg'],8).'/'.substr($laporan_data['tgl_reg'],5,2).'/'.substr($laporan_data['tgl_reg'],0,4);
	$waktu_post = substr($laporan_data['waktu_post'],10);
	
	$biaya = 'Rp ' . number_format(($laporan_data['biaya']), 0, '', '.') . ',00';
	
	$sandi = '';
	if($jenis_simp == 1){//tab
		if ($laporan_data['sandi_simp'] == '1') {
			$sandi = '1';
		}else if ($laporan_data['sandi_simp'] == '3') {
			$sandi = '7';
		}else if ($laporan_data['sandi_simp'] == '2') {
			$sandi = '9';
		}
	}else if($jenis_simp == 2){//pokok
		$sandi = '74';		
	}else if($jenis_simp == 3){//wajib
		$sandi = '82';		
	}
	
	$jumlah = $laporan_data['biaya'];
	$saldo = $saldo_data['saldo_simp'];
	//$jumlah = '125240000';
	//$saldo = '220202500';
	if($jumlah < 0){
		$jumlah = $jumlah * -1;
	}
	//$jumlah = 222522122;
	$npwp = '22';
	
	
	
	/*
	$sekarang = date("j").' '.nama_bulan(date("m")).' '.date("Y");
	*/

$this->fpdf->SetMargins(1,1,1);
$this->fpdf->SetAutoPageBreak(true,1);
$this->fpdf->Open();
$this->fpdf->AliasNbPages();
$this->fpdf->AddPage();

$this->fpdf->Ln();
//$this->fpdf->Cell(0.05,0.7,"",'TLBR',0,'C',1);
//$this->fpdf->Cell(3.5,0.7,'NPWP','L',0,'L');
//$this->fpdf->Cell(0.5,0.7,':',0,0,'C');
//$this->fpdf->SetFont('Times','',12);

//$this->fpdf->Ln();
//$this->fpdf->Cell(0.7,0.7,$npwp, 'BR', 0, 'C');// substr($npwp, 0, 1),'LBR',0,'C');
//$this->fpdf->Cell(2.5,0.7,"",'R',0,'C');
//$this->fpdf->Cell(0.05,0.7,"",'TLBR',0,'C',1);

//$this->fpdf->Ln(0.7);
$size02 = 1;
$size03 = 0;
$size1 = 10;
$size2 = 9.1;
$size3 = 2;
$size4 = 1;
$size5 = 1.5;
$size6 = 3;
$size7 = 1.5;

	$this->fpdf->SetFont('Times','',11);
	//$this->fpdf->Cell(1,$size02,$no_transaksi . ' - ' .$tgl,0,0,'L'); //tgl	
	//$this->fpdf->Cell(-2,1,$tgl . ' - ' .$tgl,0,0,'L'); //tgl	
	
	//$this->fpdf->Cell(40,10,'Hello World !',1);
	//$this->fpdf->MultiCell(0,0,$no_transaksi . '       ' . $no_rekening  . '       ' . $nama);
    // Line break
	//$this->fpdf->MultiCell(0,1,$tgl . '       ' . $waktu_post . '       ' . $biaya);
	
	//$this->fpdf->SetFont('Times','',9);
	$this->fpdf->Cell($size1,$size02,$no_transaksi . '       ' . $no_rekening  . '       ' . $nama,0,0,'C'); //tgl
    $this->fpdf->Ln();
	$this->fpdf->Cell($size2,$size03,$tgl . '       ' . $waktu_post . '       ' . $biaya,0,0,'C'); //tgl
	//$this->fpdf->Cell($size1,$size02,$tgl,0,0,'C'); //tgl
	//$this->fpdf->Cell($size2,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C'); //pokok
	//$this->fpdf->Cell($size2,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C'); //pokok
	//$this->fpdf->Cell($size3,$size02,'',0,0,'C');
	//$this->fpdf->Cell($size4,$size02,$sandi,0,0,'C');
	//$this->fpdf->Cell($size5,$size02,'',0,0,'C');
	//$this->fpdf->Cell($size6,$size02,'',0,0,'C');
	//$this->fpdf->Cell($size7,$size02,number_format(($saldo), 0, '', '.'),0,0,'C'); //jumlah
	
/*	
if($sandi=='74'){
	$this->fpdf->SetFont('Times','',9);
	$this->fpdf->Cell($size1,$size02,$tgl,0,0,'C'); //tgl
	$this->fpdf->Cell($size2,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C'); //pokok
	$this->fpdf->Cell($size3,$size02,'',0,0,'C');
	$this->fpdf->Cell($size4,$size02,$sandi,0,0,'C');
	$this->fpdf->Cell($size5,$size02,'',0,0,'C');
	$this->fpdf->Cell($size6,$size02,'',0,0,'C');
	$this->fpdf->Cell($size7,$size02,number_format(($saldo), 0, '', '.'),0,0,'C'); //jumlah
}else if($sandi=='82'){
	$this->fpdf->SetFont('Times','',9);
	$this->fpdf->Cell($size1,$size02,$tgl,0,0,'C'); //tgl
	$this->fpdf->Cell($size2,$size02,'',0,0,'C'); //pokok
	$this->fpdf->Cell($size3,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C');
	$this->fpdf->Cell($size4,$size02,$sandi,0,0,'C');
	$this->fpdf->Cell($size5,$size02,'',0,0,'C');
	$this->fpdf->Cell($size6,$size02,'',0,0,'C');
	$this->fpdf->Cell($size7,$size02,number_format(($saldo), 0, '', '.'),0,0,'C'); //jumlah
}else{
	$this->fpdf->SetFont('Times','',9);
	$this->fpdf->Cell($size1,$size02,$tgl,0,0,'C'); //tgl
	$this->fpdf->Cell($size2,$size02,'',0,0,'C'); //pokok
	$this->fpdf->Cell($size3,$size02,'',0,0,'C');
	$this->fpdf->Cell($size4,$size02,$sandi,0,0,'C');
	$this->fpdf->Cell($size5,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C');
	$this->fpdf->Cell($size6,$size02,'',0,0,'C');
	$this->fpdf->Cell($size7,$size02,number_format(($saldo), 0, '', '.'),0,0,'C'); //jumlah
}
*/
$this->fpdf->Output("form_simpan_pinjam.pdf","I");
?>
